package com.gxa.clientorder.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author FanJiang
 * @Date 2020/11/11
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
//连接订单表
@Table(name = "tb_order")
public class Order implements Serializable {

    @Id
    @Column(name = "ord_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    //商品系统编号
    @Column(name = "pro_sysnum")
    private String sysnum;

    //订单编号
    @Column(name = "ord_num")
    private String ordnum;

    //订单综合状态
    @Column(name = "ord_zstate")
    private Integer zstate;

    //订单支付状态
    @Column(name = "ord_paystate")
    private Integer paystate;//支付状态

    //团购状态
    @Column(name = "gro_state")
    private Integer grostate;

    //团购编号
    @Column(name = "gro_num")
    private String gronum;

    //下单时间
    @Column(name = "ord_buytime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "CST")
    private Date buytime;

    //购买用户id
    @Column(name = "user_id")
    private Integer userid;

    //购买用户昵称
    @Column(name = "user_username")
    private String username;

    //下单金额
    @Column(name = "ord_money")
    private  Double money;

    //支付方式
    @Column(name = "ord_paytype")
    private String paytype;

    //付款时间
    @Column(name = "ord_paytime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "CST")
    private Date paytime;

    //配送方式
    //1、快递配送，2、门店自提
    @Column(name = "ord_sendtype")
    private Integer sendtype;

    //发货单号
    @Column(name = "sen_num")
    private String sennum;

    //客户留言
    @Column(name = "ord_message")
    private String message;

    //订单分类
    @Column(name = "ord_ordtype")
    private Integer ordtype;


}
